package com.bf.electroplating.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 企业排污阀基础信息表
 *
 * @author system
 * @since 2025-10-09
 */
@Getter
@Setter
@TableName("enterprise_outfall_valve_info")
@Schema(description = "企业排污阀基础信息表")
public class EnterpriseOutfallValveInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "ID")
    @TableId("ID")
    private String id;

    @Schema(description = "企业ID")
    @TableField("COMPANY_ID")
    private String companyId;

    @Schema(description = "企业名称")
    @TableField("COMPANY_NAME")
    private String companyName;

    @Schema(description = "园区ID")
    @TableField("PARK_ID")
    private String parkId;

    @Schema(description = "园区名称")
    @TableField("PARK_NAME")
    private String parkName;

    @Schema(description = "排污口ID")
    @TableField("OUTFALL_ID")
    private String outfallId;

    @Schema(description = "排污口名称")
    @TableField("OUTFALL_NAME")
    private String outfallName;

    // ==================== 设备基本信息 ====================
    @Schema(description = "设备名称")
    @TableField("DEVICE_NAME")
    private String deviceName;

    @Schema(description = "设备编码")
    @TableField("DEVICE_CODE")
    private String deviceCode;

    @Schema(description = "MN码（HJ212设备唯一标识）")
    @TableField("MN_CODE")
    private String mnCode;

    @Schema(description = "设备类型：OUTFALL-排污阀,EMERGENCY-应急阀,RAIN-雨排阀")
    @TableField("DEVICE_TYPE")
    private String deviceType;

    @Schema(description = "阀门类型：ELECTRIC-电动阀,PNEUMATIC-气动阀,MANUAL-手动阀")
    @TableField("VALVE_TYPE")
    private String valveType;

    @Schema(description = "阀门型号")
    @TableField("VALVE_MODEL")
    private String valveModel;

    @Schema(description = "阀门口径(mm)")
    @TableField("VALVE_DIAMETER")
    private BigDecimal valveDiameter;

    @Schema(description = "生产厂家")
    @TableField("MANUFACTURER")
    private String manufacturer;

    // ==================== 安装信息 ====================
    @Schema(description = "安装位置")
    @TableField("INSTALL_LOCATION")
    private String installLocation;

    @Schema(description = "安装日期")
    @TableField("INSTALL_DATE")
    private LocalDate installDate;

    @Schema(description = "经度")
    @TableField("LONGITUDE")
    private BigDecimal longitude;

    @Schema(description = "纬度")
    @TableField("LATITUDE")
    private BigDecimal latitude;

    // ==================== 控制指令配置 ====================
    @Schema(description = "是否启用远程控制：1-是,0-否")
    @TableField("REMOTE_CONTROL_ENABLED")
    private String remoteControlEnabled;

    @Schema(description = "是否启用自动控制：1-是,0-否")
    @TableField("AUTO_CONTROL_ENABLED")
    private String autoControlEnabled;

    @Schema(description = "远控开启指令")
    @TableField("REMOTE_OPEN_CMD")
    private String remoteOpenCmd;

    @Schema(description = "远控关闭指令")
    @TableField("REMOTE_CLOSE_CMD")
    private String remoteCloseCmd;

    @Schema(description = "阀门开启指令")
    @TableField("VALVE_OPEN_CMD")
    private String valveOpenCmd;

    @Schema(description = "阀门开启结束指令")
    @TableField("VALVE_OPEN_END_CMD")
    private String valveOpenEndCmd;

    @Schema(description = "阀门关闭指令")
    @TableField("VALVE_CLOSE_CMD")
    private String valveCloseCmd;

    @Schema(description = "阀门关闭结束指令")
    @TableField("VALVE_CLOSE_END_CMD")
    private String valveCloseEndCmd;

    // ==================== 告警配置 ====================
    @Schema(description = "流量告警阈值(m³/h)")
    @TableField("FLOW_ALARM_THRESHOLD")
    private BigDecimal flowAlarmThreshold;

    @Schema(description = "PH最小阈值")
    @TableField("PH_MIN_THRESHOLD")
    private BigDecimal phMinThreshold;

    @Schema(description = "PH最大阈值")
    @TableField("PH_MAX_THRESHOLD")
    private BigDecimal phMaxThreshold;

    @Schema(description = "COD告警阈值(mg/L)")
    @TableField("COD_ALARM_THRESHOLD")
    private BigDecimal codAlarmThreshold;

    // ==================== 维护信息 ====================
    @Schema(description = "上次维护日期")
    @TableField("LAST_MAINTENANCE_DATE")
    private LocalDate lastMaintenanceDate;

    @Schema(description = "下次维护日期")
    @TableField("NEXT_MAINTENANCE_DATE")
    private LocalDate nextMaintenanceDate;

    @Schema(description = "维护周期(天)")
    @TableField("MAINTENANCE_CYCLE")
    private Integer maintenanceCycle;

    @Schema(description = "维护负责人")
    @TableField("MAINTENANCE_PERSON")
    private String maintenancePerson;

    @Schema(description = "维护负责人电话")
    @TableField("MAINTENANCE_PHONE")
    private String maintenancePhone;

    // ==================== 状态字段 ====================
    @Schema(description = "在线状态：ONLINE-在线,OFFLINE-离线")
    @TableField("ONLINE_STATUS")
    private String onlineStatus;

    @Schema(description = "当前阀门状态：OPEN-开启,CLOSE-关闭")
    @TableField("CURRENT_STATUS")
    private String currentStatus;

    @Schema(description = "启用状态：1-启用,0-停用")
    @TableField("STATUS")
    private String status;

    @Schema(description = "逻辑删除：0-正常,1-删除")
    @TableField("DEL_FLAG")
    private String delFlag;

    // ==================== 系统字段 ====================
    @Schema(description = "创建人")
    @TableField("CREATE_BY")
    private String createBy;

    @Schema(description = "创建时间")
    @TableField("CREATE_TIME")
    private LocalDateTime createTime;

    @Schema(description = "修改人")
    @TableField("UPDATE_BY")
    private String updateBy;

    @Schema(description = "修改时间")
    @TableField("UPDATE_TIME")
    private LocalDateTime updateTime;

    @Schema(description = "备注")
    @TableField("REMARK")
    private String remark;
}

